『Production Haskell』
https://gyazo.com/6c592cfc8001d2f39b27e3d318595484
2023-02-02
書評
目次見た感じまあまあ難しそう
haskellを使ったarchitecture設計の本
Introduction
An Opinionated Tour Guide
About the Author
Acknowledgements
Principles
Complexity
Novelty
Cohesion
Empathy
References
I Building Haskell Teams
1. Selling Haskell
1.1 Assessing Receptiveness
1.2 Software Productivity
1.3 Statistics of Productivity
1.4 Know Your Competition
2. Learning and Teaching Haskell
2.1 The Philology of Haskell
2.2 Programming Is Hard To Learn
2.3 Pick Learning Materials
2.4 Write Lots of Code
2.5 Don’t Fear the GHC
2.6 Start Simple
2.7 Solve Real Problems
2.8 Pair Programming
2.9 A Dialogue
2.10 References
3.1 The Double-edged Sword
3.2 Juniors and Seniors
3.3 Hiring Seniors
3.4 Hiring Juniors
4. Evaluating Consultancies
4.1 Identifying the Target
4.2 Well-Typed
4.3 FP Complete
II Application Structure
5. The Beginning
5.1 Abstraction for Mocking
5.2 Forward Compatibility
5.3 AppEnvironment
5.4 The ReaderT Pattern
5.5 Embed, don’t Stack
6. Three Layer Haskell Cake
6.1 Layer 1: Imperative Programming
6.2 Layer 2: Object Oriented Programming
6.3 Layer 3: Functional Programming
6.4 Examples
7. Invert Your Mocks!
7.1 Decomposing Effects
7.2 Streaming Decomposition
7.3 Plain ol’ abstraction
7.4 Decompose!!!
7.5 What if I need to?
8. Project Preludes
8.1 Prelude Problems
8.2 Custom Benefits
8.3 Off-The-Shelf Preludes
8.4 Nesting Preludes
8.5 Downsides
8.6 Using a Custom Prelude
9. Optimizing GHC Compile Times
9.1 The Project.Types Megamodule
9.2 Package Splitting
9.3 Big Ol’ Instances Module
9.4 TemplateHaskell
9.5 Some random parting thoughts
10. Type Safety Back and Forth
10.1 The Ripple Effect
10.2 Ask Only What You Need
11. Keep Your Types Small…
11.1 Expansion and Restriction
11.2 Constraints Liberate
11.3 Restrict the Range
11.4 A perfect fit
12. The Trouble with Typed Errors
12.1 Monolithic error types are bad
12.2 Boilerplate be gone!
12.3 Type Classes To The Rescue!
12.4 The virtue of untyped errors
13. Exceptions
13.1 Exceptions In Five Minutes
13.2 Best Practices
13.3 Hierarchies
13.4 Reinventing
13.5 Asynchronous Exceptions
13.6 The Theory
13.7 HasCallStack
14. EDSL Design
14.1 Tricks with do
14.2 Overloaded Literals
14.3 Type Inference Trick
14.4 Fluent Interfaces
14.5 Case Study: Weightlifting Logging
14.6 Case Study: rowdy
14.7 Case Study: hspec
15. Growing Pains
15.1 A Taxonomy of Breaking Changes
15.2 Avoiding Breaking Changes
15.3 Communicating To Users
IV Interfacing the Real
16. Testing
16.1 Libraries and Tools
16.2 Designing Code for Testing
17. Logging and Observability
17.1 On Debug.Trace
17.2 Prefer do Notation
17.3 Logging Contexts
17.4 Libraries in Brief
18. Databases
18.1 Separate Database Types
18.2 Migrations
18.3 Access Patterns
18.4 Conclusion
V Advanced Haskell
19. Template Haskell Is Not Scary
19.1 A Beginner Tutorial
19.2 wait this isn’t haskell what am i doing here
19.3 Constructing an AST
19.4 Boilerplate Be Gone!
20. Basic Type Level Programming
20.1 The Basic Types
20.2 The Higher Kinds
20.3 Dynamically Kinded Programming
20.4 Data Kinds
20.6 Vectors
20.7 Type Families
20.8 This Sucks
20.9 Heterogeneous Lists
20.10 Inductive Type Class Instances
20.11 Extensible Records
20.12 Like what you read?
21. Family Values
21.1 Type Families
21.2 Open or Closed Type Families?
21.3 The Bridge Between Worlds
21.4 Data Families
21.5 Conclusion
22. Trade-offs in Type Programming
22.1 MPTCs
22.2 MPTCs + Fundeps
22.3 Associated Types
22.4 Comparisons
23. Case Study: Prairie
23.1 Problem Statement:
23.2 Prior Art
23.3 The GADT Approach
23.4 Improvements?
23.5 Symbols
23.6 Compare and Constrast
23.7 Identify the Issue
23.8 Generalize a GADT
23.9 Fundeps
23.10 More Class Please
23.11 Refining the Class
23.13 Conclusion
Notes